﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Dycox.Workflows
{
    public class ExitingStageEventArgs : WorkflowExecutionEventArgs
    {
        public new WorkflowForwardingContext Context
        {
            get { return (WorkflowForwardingContext)base.Context; }
        }
    }

    public delegate void ExitingStageEventHandler(object sender, ExitingStageEventArgs e);

    public class EnterStageEventArgs : WorkflowExecutionEventArgs
    {
        public new WorkflowForwardingContext Context
        {
            get { return (WorkflowForwardingContext)base.Context; }
        }

    }

    public delegate void EnterStageEventHandler(object sender, EnterStageEventArgs e);

    public class ModifyStageEventArgs : WorkflowExecutionEventArgs
    {
        internal ModifyStageEventArgs(ModifyStageContext context)
            : base(context)
        {

        }

        public new ModifyStageContext Context
        {
            get { return (ModifyStageContext)base.Context; }
        }

        public bool IsModificationSource
        {
            get { return Context.IsModificationSource; }
        }

        public Stage SourceStage
        {
            get { return Context.Stage; }
        }

        public WFStep SourceStep
        {
            get { return Context.Step; }
        }
    }

    public delegate void ModifyStageEventHandler(object sender, ModifyStageEventArgs e);
}
